#@weiXinLayout("修改登录密码")
#define weiXinMain()
#@navBar("修改登录密码",contextPath+"/weixin/mine")
<form id="submitForm">
<div class="weui-cells__title">用户旧密码</div>
<div class="weui-cells">
    <div class="weui-cell">
        <div class="weui-cell__bd">
            <input class="weui-input"  name="oldPass" type="password" placeholder="请输入用户旧密码...">
        </div>
    </div>
</div>
<div class="weui-cells__title">新密码</div>
<div class="weui-cells">
    <div class="weui-cell">
        <div class="weui-cell__bd">
            <input class="weui-input"  name="newPass" type="password" placeholder="请输入新密码...">
        </div>
    </div>
</div>
<div class="weui-cells__title">确认密码</div>
<div class="weui-cells">
    <div class="weui-cell">
        <div class="weui-cell__bd">
            <input class="weui-input" name="confirmPass" type="password" placeholder="请输入确认密码...">
        </div>
    </div>
</div>

<div class="button-padding">
    <input type="hidden" name="id" value="#(memberInfo.id??'')" name="id">
    <a href="javascript:;" id="submitBtn" class="weui-btn weui-btn_primary">保存信息</a>
</div>
</form>
#end

#define weiXinCss()
#end

#define weiXinJs()
<script>
    $(document).ready(function(){
        $("#submitBtn").click(function(){
            $.confirm({
                "title":"系统提示",
                "text":"确定要进行当前操作么？",
                "onOK":function(){
                    var config ={
                        "url":"#(contextPath)/weixin/mine/doResetPass",
                        "data":$("#submitForm").serialize(),
                        "successCallBack":function(resp){
                            if(resp.result){
                                $.alert(resp.data,function(){
                                    window.location.href="#(contextPath)/weixin/mine"
                                });
                            }else{
                                $.alert(resp.data,function () {
                                    window.location.reload();
                                });
                            }
                        }
                    };
                    var ajax = new AjaxUtils(config);
                    ajax.executeRequest();
                }
            })
        });
    })
</script>
#end
